﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;

namespace Vortex.Input {

	/// <summary>
	/// Defines mouse interface for Vortex2D.NET Engine
	/// </summary>
	public interface IMouse {

		/// <summary>
		/// Gets the location of mouse cursor inside a binded window.
		/// </summary>
		/// <value>The location of cursor.</value>
		Point Location { get; set; }

		/// <summary>
		/// Gets the previous location of mouse cursor.
		/// </summary>
		/// <value>The previous location of mouse cursor.</value>
		Point PreviousLocation { get; }

		/// <summary>
		/// Gets the delta  of mouse location comparing to last frame.
		/// </summary>
		/// <value>The mouse location delta.</value>
		Point LocationDelta { get; }

		/// <summary>
		/// Gets the wheel value since IMouse instance was created.
		/// </summary>
		/// <value>The wheel value.</value>
		int WheelValue { get; }

		/// <summary>
		/// Gets a value indicating whether left mouse button is down.
		/// </summary>
		/// <value>
		/// 	<c>true</c> if left mouse button is down; otherwise, <c>false</c>.
		/// </value>
		bool IsLeftDown { get; }

		/// <summary>
		/// Gets a value indicating whether middle mouse button is down.
		/// </summary>
		/// <value>
		/// 	<c>true</c> if middle mouse button is down; otherwise, <c>false</c>.
		/// </value>
		bool IsMiddleDown { get; }

		/// <summary>
		/// Gets a value indicating whether right mouse button is down.
		/// </summary>
		/// <value>
		/// 	<c>true</c> if right mouse button is down; otherwise, <c>false</c>.
		/// </value>
		bool IsRightDown { get; }

		/// <summary>
		/// Gets a value indicating whether mouse cursor is over client area of window.
		/// </summary>
		/// <value>
		/// 	<c>true</c> if mouse cursor is over window; otherwise, <c>false</c>.
		/// </value>
		bool IsOverWindow { get; }

		/// <summary>
		/// Triggered when some mouse button is pressed.
		/// </summary>
		event MouseButtonActionHandler ButtonDown;

		/// <summary>
		/// Triggered when left mouse button is pressed.
		/// </summary>
		event MouseButtonActionHandler LeftButtonDown;

		/// <summary>
		/// Triggered when right mouse button is pressed.
		/// </summary>
		event MouseButtonActionHandler RightButtonDown;

		/// <summary>
		/// Triggered when middle mouse button is pressed.
		/// </summary>
		event MouseButtonActionHandler MiddleButtonDown;

		/// <summary>
		/// Triggered when some mouse down is released.
		/// </summary>
		event MouseButtonActionHandler ButtonUp;

		/// <summary>
		/// Triggered when left mouse down is released.
		/// </summary>
		event MouseButtonActionHandler LeftButtonUp;

		/// <summary>
		/// Triggered when middle mouse down is released.
		/// </summary>
		event MouseButtonActionHandler MiddleButtonUp;

		/// <summary>
		/// Triggered when right mouse down is released.
		/// </summary>
		event MouseButtonActionHandler RightButtonUp;

		/// <summary>
		/// Triggered on mouse click.
		/// </summary>
		event MouseButtonActionHandler Click;

		/// <summary>
		/// Triggered on left mouse button click.
		/// </summary>
		event MouseButtonActionHandler LeftClick;

		/// <summary>
		/// Triggered on middle mouse button click.
		/// </summary>
		event MouseButtonActionHandler MiddleClick;

		/// <summary>
		/// Triggered on right mouse button click.
		/// </summary>
		event MouseButtonActionHandler RightClick;

		/// <summary>
		/// Triggered on mouse double click.
		/// </summary>
		event MouseButtonActionHandler DoubleClick;

		/// <summary>
		/// Triggered on left mouse button double click.
		/// </summary>
		event MouseButtonActionHandler LeftDoubleClick;

		/// <summary>
		/// Triggered on middle mouse button double click.
		/// </summary>
		event MouseButtonActionHandler MiddleDoubleClick;

		/// <summary>
		/// Triggered on right mouse button double click.
		/// </summary>
		event MouseButtonActionHandler RightDoubleClick;

		/// <summary>
		/// Triggered when mouse cursor is moved.
		/// </summary>
		event MouseMoveActionHandler Move;

		/// <summary>
		/// Triggered when mouse wheel is scrolled.
		/// </summary>
		event MouseWheelActionHandler Wheel;

	}

}
